package com.idp.common.constants;

import java.io.File;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;

/**
 * 系统参数
 * @author king
 */
@Component
@Data
public class SystemParam {

	@Value("${system.fileRootDir}")
	private String fileRootDir;
	@Value("${system.userDefaultPwd}")
	private String userDefaultPwd;

	@Value("${wechat.appid}")
	private String wechatAppid;
	@Value("${wechat.secret}")
	private String wechatSecret;

	@Value("${system.fileServerPath}")
	private String fileServerPath;

	public String getFileRootDir() {
		File file = new File(this.fileRootDir);

		if(!file.exists()) {
			file.mkdirs();
		}
		return this.fileRootDir;
	}

}
